/**
 * 违规ip模块 Api
 * @type {SlogAbnormalIpApi}
 */
const slogAbnormalIpApi = new class SlogAbnormalIpApi extends BaseApi {
    constructor() {
        super('/api/slogAbnormalIp')
    }

    async reportData(data) {
        return (await rxajax.post(super.using('/report-data'), data, {type: 'json'}))
    }

    async handle(data) {
        return (await rxajax.post(super.using('/handle'), data, {type: 'json'})).data
    }

    async cancelHandle(data) {
        return (await rxajax.post(super.using('/cancel-handle'), data, {type: 'json'})).data
    }


    /**
     * 手动上报非法ip到管局
     * @returns {Promise<void>}
     */
    async reportAbnormalData(data){
        return (await rxajax.post(super.using('/reportAbnormalData'), data, {type: 'json'}))
    }

    async notReportTotal() {
        return (await rxajax.get(this.using('/not-report-total'))).data.data
    }

}